package study.lgf.action;

import study.lgf.exceptions.SecurityBreachException;

import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class ExceptionAction extends ActionSupport{
	@Override
	public String execute() throws Exception {
		return super.execute();
	}
	
	public void throwException() throws Exception {

		throw new Exception("抛出错误异常");

	}

	public void throwNullPointerException() throws NullPointerException {

		throw new NullPointerException("空指针异常");
	}

	public void throwSecurityException() throws SecurityBreachException {
		throw new SecurityBreachException("自定义抛出权限不够异常");
	}
}
